<template>
	<view class="">
		<view class="beijin">
			<image
				src="http://fangguaner.oss-cn-chengdu.aliyuncs.com/upload/20210721/fb81077df717acda561a8d3a5e32198c.png"
				mode=""></image>
		</view>
		<view class="box">
			<view class="sucess" v-if="obj[0].level=='及格'">
				<text class="acquisition">获得学分</text>
				<text>{{obj[0].integral}}</text>
				<!-- {{obj[0].integral}} -->
				<!-- <image
					src="http://fangguaner.oss-cn-chengdu.aliyuncs.com/upload/20210726/d5c70bb6e4936e9c9c78eaa381eef94e.png"
					mode="">
				</image> -->
			</view>
			<image
				src="http://fangguaner.oss-cn-chengdu.aliyuncs.com/upload/20210726/755f5cd6e6e7c8b4a37ea62b4fae1a71.png"
				mode="" v-if="obj[0].level!='及格'" class="fail"></image>
			<view class="bottombtn">
				<view class="mistakes" @click="mistakes">
					查看错题
				</view>
				<view class="returnpage" @click="returnpage">
					回到首页
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		Togettheanswer
	} from "../../api/api/index"
	export default {
		data() {
			return {
				obj: {}
			}
		},
		onLoad() {
			uni.showLoading({
				title: "加载中"
			})
			Togettheanswer({
				id: 1
			}).then(res => {
				uni.hideLoading()
				this.obj = res.data
			})
		},
		methods: {
			returnpage() {}
		}
	}
</script>

<style scoped lang="less">
	.beijin {
		image {
			width: 100%;
			margin-top: -180rpx;
		}
	}

	.box {
		width: 690rpx;
		height: 1142rpx;
		background-color: #ffffff;
		box-shadow: 0rpx 2rpx 5rpx 1rpx rgba(0, 0, 0, 0.21);
		border-radius: 20rpx;
		position: absolute;
		top: 30rpx;
		left: 30rpx;

		.fail {
			width: 443rpx;
			height: 325rpx;
			margin: 98rpx 124rpx;
		}

		.sucess {
			background: url("http://fangguaner.oss-cn-chengdu.aliyuncs.com/upload/20210726/d5c70bb6e4936e9c9c78eaa381eef94e.png") no-repeat;
			width: 443rpx;
			height: 325rpx;
			background-size: cover;
			line-height: 108rpx;
			text-align: center;
			margin: 98rpx 124rpx;
			font-family: PingFang-SC-Bold;
			font-size: 100rpx;
			color: #ffffff;
			z-index: 9999;

			.acquisition {
				font-family: PingFang-SC-Bold;
				font-size: 24rpx;
				color: #ffffff;
				display: block;
			}
		}

		.bottombtn {
			display: flex;
			justify-content: space-around;
			align-items: center;
			margin-top: 200rpx;

			.mistakes {
				width: 195rpx;
				height: 70rpx;
				background-color: #326fd5;
				border-radius: 35rpx;
				font-family: TaipeiSansTCBeta-Regular;
				font-size: 26rpx;
				color: #ffffff;
				text-align: center;
				line-height: 70rpx;
			}

			.returnpage {
				width: 195rpx;
				height: 70rpx;
				background-color: #fc7b63;
				border-radius: 35rpx;
				font-family: TaipeiSansTCBeta-Regular;
				font-size: 26rpx;
				color: #ffffff;
				text-align: center;
				line-height: 70rpx;
			}
		}
	}
</style>
